package com.battery.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 广告对象 ws_advert
 *
 * @author battery
 * @date 2021-08-03
 */
@Table(name = "ws_advert")
public class Advert {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id;

    /**
     * 使用场景类型
     */
    @Excel(name = "使用场景类型")
    private Integer useSceneType;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 图片
     */
    @Excel(name = "图片")
    private String img;

    /**
     * 是否关闭
     */
    @Excel(name = "是否关闭")
    private Integer isClose;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUseSceneType(Integer useSceneType) {
        this.useSceneType = useSceneType;
    }

    public Integer getUseSceneType() {
        return useSceneType;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getImg() {
        return img;
    }

    public void setIsClose(Integer isClose) {
        this.isClose = isClose;
    }

    public Integer getIsClose() {
        return isClose;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("useSceneType", getUseSceneType())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remarks", getRemarks())
                .append("img", getImg())
                .append("isClose", getIsClose())
                .toString();
    }
}
